This is an R Markdown document that checks data that has passed initial delivery QC and is now in the test phase.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
Uses check_fields() function to control if all required fields are present.
check_Chlorophyll(myfile)
## # A tibble: 15 x 4
## level field row message
## <chr> <chr> <lgl> <chr>
## 1 error sample_time NA Required field sample_time is missing
## 2 error sample_enddate NA Required field sample_enddate is missing
## 3 error sample_endtime NA Required field sample_endtime is missing
## 4 error water_depth_m NA Required field water_depth_m is missing
## 5 error sampling_laboratory_acc~ NA Required field sampling_laboratory_accr~
## 6 error sampled_volume_l NA Required field sampled_volume_l is miss~
## 7 error quality_flag NA Required field quality_flag is missing
## 8 error method_reference_code NA Required field method_reference_code is~
## 9 error estimation_uncertainty NA Required field estimation_uncertainty i~
## 10 error method_calculation_unce~ NA Required field method_calculation_uncer~
## 11 error quantification_limit NA Required field quantification_limit is ~
## 12 error detection_limit NA Required field detection_limit is missi~
## 13 error analysis_range NA Required field analysis_range is missing
## 14 error analytical_laboratory_a~ NA Required field analytical_laboratory_ac~
## 15 error analysis_date NA Required field analysis_date is missing
## Rows: 3,804
## Columns: 137
## $ delivery_datatype <fct> Epibenthos, Epibenthos, Epibenth...
## $ check_status_sv <fct> Klar, Klar, Klar, Klar, Klar, Kl...
## $ data_checked_by_sv <fct> Leverantör, Leverantör, Leverant...
## $ visit_year <int> 2016, 2016, 2016, 2016, 2016, 20...
## $ station_name <fct> KRONVALD, KRONVALD, KRONVALD, KR...
## $ reported_station_name <int> 32, 32, 32, 32, 32, 32, 32, 32, ...
## $ sample_location_id <int> 135389, 135389, 135389, 135389, ...
## $ station_id <int> 263715, 263715, 263715, 263715, ...
## $ station_photo <fct> N, N, N, N, N, N, N, N, N, N, N,...
## $ station_cluster <fct> Gotland, Gotland, Gotland, Gotla...
## $ station_exposure <fct> Moderately exposed, Moderately e...
## $ station_marking <fct> Koordinater tagna 2008. ev omkas...
## $ sample_project_name_sv <fct> National marine monitoring, Nati...
## $ sample_orderer_name_sv <fct> Swedish Agency for Marine and Wa...
## $ platform_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ visit_id <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ expedition_id <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ shark_sample_id_md5 <fct> 82b5e89c794639940dacc0ef9817b006...
## $ sample_date <date> 2016-08-24, 2016-08-24, 2016-08...
## $ sample_latitude_dm <fct> 57 16.50, 57 16.50, 57 16.50, 57...
## $ sample_longitude_dm <fct> 18 05.73, 18 05.73, 18 05.73, 18...
## $ sample_latitude_dd <dbl> 57.27507, 57.27507, 57.27507, 57...
## $ sample_longitude_dd <dbl> 18.09543, 18.09543, 18.09543, 18...
## $ positioning_system_code <fct> GPS, GPS, GPS, GPS, GPS, GPS, GP...
## $ wind_direction_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ wind_speed_ms <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ wave_exposure_fetch <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ wave_height_m <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ secchi_depth_m <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ secchi_depth_quality_flag <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ visit_comment <fct> "Korrekturläst: transektdata SQ,...
## $ water_level_deviation_m <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_cluster <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_series <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_id <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_min_depth_m <dbl> 0.1, -0.2, -0.2, -0.2, 0.0, 0.0,...
## $ sample_max_depth_m <dbl> 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0....
## $ sampling_laboratory_name_sv <fct> Stockholm University Department ...
## $ sampler_type_code <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sampler_area_m2 <dbl> NA, 33, 33, 33, 93, 93, 93, 93, ...
## $ sampler_area_cm2 <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_comment <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ scientific_name <fct> NA, Cladophora glomerata, Ulva, ...
## $ species_flag_code <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ dyntaxa_id <int> NA, 232826, 1016242, NA, 232826,...
## $ parameter <fct> Salinity, Cover (%), Cover (%), ...
## $ value <dbl> 6.5, 100.0, 10.0, 100.0, 50.0, 2...
## $ unit <fct> NA, %, %, %, %, %, %, %, %, %, %...
## $ calc_by_dc <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ size_class <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ degree_biofouling <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ bitemark <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ reproductive_organs <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ detached <fct> NA, N, N, NA, N, N, N, N, N, N, ...
## $ epibiont <fct> NA, N, N, NA, N, N, N, N, N, N, ...
## $ stratum_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_part_id <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ taxonomist <fct> NA, "Susanne Qvarfordt, Ellen Sc...
## $ analysis_method_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ method_documentation <fct> "Naturvårdsverket (2004). Unders...
## $ method_comment <fct> Avsnittsindelade transekter där ...
## $ image_id <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ fauna_flora_found <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sediment_deposition_code <int> NA, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
## $ diver_name <fct> NA, Micke Borgiel, Micke Borgiel...
## $ video_interpreted <fct> NA, N, N, N, N, N, N, N, N, N, N...
## $ sample_photo_code <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ variable_comment <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ analytical_laboratory_name_sv <fct> -, -, -, -, -, -, -, -, -, -, -,...
## $ analysed_by <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ preservation_method_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ bottom_slope_deg <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_comment <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_direction_deg <int> NA, 280, 280, 280, 280, 280, 280...
## $ transect_start_latitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_start_longitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_end_latitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_end_longitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ shark_transect_id_md5 <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_id <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_length_m <int> NA, 202, 202, 202, 202, 202, 202...
## $ transect_max_depth_m <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_min_depth_m <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_max_distance_m <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_min_distance_m <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ transect_video <fct> NA, N, N, N, N, N, N, N, N, N, N...
## $ transect_width_m <int> NA, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6...
## $ sample_substrate_cover_boulder <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_comnt_boulder <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_cover_rock <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_comnt_rock <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_cover_softbottom <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_comnt_softbottom <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_cover_stone <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_comnt_stone <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_cover_gravel <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_comnt_gravel <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_cover_sand <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ sample_substrate_comnt_sand <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_bare_substrate <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_comment <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_cover_boulder <int> NA, 25, 25, 25, NA, NA, NA, NA, ...
## $ section_substrate_comnt_boulder <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_cover_gravel <int> NA, NA, NA, NA, 25, 25, 25, 25, ...
## $ section_substrate_comnt_gravel <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_cover_rock <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_comnt_rock <fct> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_cover_sand <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_comnt_sand <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_cover_softbottom <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_comnt_softbottom <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_substrate_cover_stone <int> NA, 75, 75, 75, 75, 75, 75, 75, ...
## $ section_substrate_comnt_stone <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_debris_cover <int> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_start_latitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_start_longitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_end_latitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_end_longitude_dd <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_distance_start_m <fct> NA, "0", "0", "0", "5,5", "5,5",...
## $ section_distance_end_m <int> NA, 55, 55, 55, 21, 21, 21, 21, ...
## $ section_fauna_flora_found <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ section_start_depth_m <dbl> NA, -0.2, -0.2, -0.2, 0.0, 0.0, ...
## $ section_end_depth_m <dbl> NA, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0...
## $ station_viss_eu_id <fct> SE635220-163805, SE635220-163805...
## $ water_land_station_type_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ monitoring_station_type_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ monitoring_purpose_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ monitoring_program_code <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ reported_scientific_name <fct> NA, Cladophora glomerata, Ulva, ...
## $ reported_parameter <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ reported_value <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ reported_unit <lgl> NA, NA, NA, NA, NA, NA, NA, NA, ...
## $ reporting_institute_name_sv <fct> Stockholm University Department ...
## $ data_holding_centre <fct> Swedish Meteorological and Hydro...
## $ internet_access <fct> "http://sharkweb.smhi.se, http:/...
## $ dataset_name <fct> SHARK_Epibenthos_2016_DEEP_Gotla...
## $ dataset_file_name <fct> SHARK_Epibenthos_2016_DEEP_Gotla...
## Warning in instance$preRenderHook(instance): It seems your data is too big
## for client-side DataTables. You may consider server-side processing: https://
## rstudio.github.io/DT/server.html
Uses plot_map_leaflet to render an interactive leaflet map of sampled stations in the data.
Uses check_stations() to control if station name is found in the SMHI curated list and location is within preset distance limit
# check_stations(myfile)
Uses check_onland() to control if any locations are on land.
# check_onland(myfile)
Uses check_depth() to control if any sample depths are incorrect.
# check_depth(myfile)
Uses check_outliers() function to control if all values are within range.
check_epibenthos_counted(myfile)
## WARNING: Parameter # counted, measurement(s) is outside range please check for outliers!
check_epibenthos_dryweight(myfile)
## WARNING: Parameter Dry weight, measurement(s) is outside range please check for outliers!
check_epibenthos_specdistr_maxdepth(myfile)
## Parameter Species distribution max depth not found
check_epibenthos_specdistr_mindepth(myfile)
## Parameter Species distribution min depth not found
Uses check_logical() function to control if data follows logical assumptions.
check_value_logical(myfile)
## Expected numerical value is formatted as numerical and no character values were found
check_epibenthos_abundclass_logical(myfile)
## Parameter Abundance class not found
## Parameter Abundance class, measurement(s) is between 0-10
check_epibenthos_cover_logical(myfile)
## Parameter Cover not found
## Parameter Cover, measurement(s) is between 0-100%
check_epibenthos_coverclass_logical(myfile)
## Parameter Cover class not found
## Parameter Cover class, measurement(s) is between 0-10
check_epibenthos_coverpercent_logical(myfile)
## Parameter Cover (%), measurement(s) is between 0-100%
check_epibenthos_sedimentdepos_logical(myfile)
## Parameter Sediment deposition cover (%) not found
## Parameter Sediment deposition cover (%), measurement(s) is between 0-100%
check_epibenthos_totcover_logical(myfile)
## Parameter Total cover of all species (%), measurement(s) is between 0-100%
Uses check_codes() function to control if data follows the SMHI codelist.
check_code_proj(myfile)
##
## -- Column specification --------------------------------------------------------
## cols(
## Data_field = col_character(),
## Code = col_character(),
## `Beskrivning/Svensk översättning` = col_character(),
## `Description/English translate` = col_character()
## )
## All project (PROJ) codes found
# Date time
Sys.time()
## [1] "2020-11-11 22:34:03 EET"
# Here we store the session info for this script
sessioninfo::session_info()
## - Session info ---------------------------------------------------------------
## setting value
## version R version 4.0.3 (2020-10-10)
## os Windows 10 x64
## system x86_64, mingw32
## ui RTerm
## language (EN)
## collate Swedish_Sweden.1252
## ctype Swedish_Sweden.1252
## tz Europe/Helsinki
## date 2020-11-11
##
## - Packages -------------------------------------------------------------------
## package * version date lib source
## assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.3)
## backports 1.2.0 2020-11-02 [1] CRAN (R 4.0.3)
## broom 0.7.2 2020-10-20 [1] CRAN (R 4.0.3)
## cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.0.3)
## cli 2.1.0 2020-10-12 [1] CRAN (R 4.0.3)
## colorspace 2.0-0 2020-11-11 [1] CRAN (R 4.0.3)
## crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.3)
## crosstalk 1.1.0.1 2020-03-13 [1] CRAN (R 4.0.3)
## data.table 1.13.2 2020-10-19 [1] CRAN (R 4.0.3)
## DBI 1.1.0 2019-12-15 [1] CRAN (R 4.0.3)
## dbplyr 2.0.0 2020-11-03 [1] CRAN (R 4.0.3)
## digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3)
## dplyr * 1.0.2 2020-08-18 [1] CRAN (R 4.0.3)
## DT * 0.16 2020-10-13 [1] CRAN (R 4.0.3)
## ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.3)
## evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.3)
## fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.3)
## forcats * 0.5.0 2020-03-01 [1] CRAN (R 4.0.3)
## fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.3)
## generics 0.1.0 2020-10-31 [1] CRAN (R 4.0.3)
## ggplot2 * 3.3.2 2020-06-19 [1] CRAN (R 4.0.3)
## glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.3)
## gtable 0.3.0 2019-03-25 [1] CRAN (R 4.0.3)
## haven 2.3.1 2020-06-01 [1] CRAN (R 4.0.3)
## hms 0.5.3 2020-01-08 [1] CRAN (R 4.0.3)
## htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.3)
## htmlwidgets 1.5.2 2020-10-03 [1] CRAN (R 4.0.3)
## httr * 1.4.2 2020-07-20 [1] CRAN (R 4.0.3)
## jsonlite 1.7.1 2020-09-07 [1] CRAN (R 4.0.3)
## knitr * 1.30 2020-09-22 [1] CRAN (R 4.0.3)
## labeling 0.4.2 2020-10-20 [1] CRAN (R 4.0.3)
## lazyeval 0.2.2 2019-03-15 [1] CRAN (R 4.0.3)
## leaflet * 2.0.3 2019-11-16 [1] CRAN (R 4.0.3)
## leaflet.providers 1.9.0 2019-11-09 [1] CRAN (R 4.0.3)
## lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.3)
## lubridate * 1.7.9 2020-06-08 [1] CRAN (R 4.0.3)
## magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.3)
## modelr 0.1.8 2020-05-19 [1] CRAN (R 4.0.3)
## munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.3)
## pillar 1.4.6 2020-07-10 [1] CRAN (R 4.0.3)
## pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.3)
## plotly * 4.9.2.1 2020-04-04 [1] CRAN (R 4.0.3)
## purrr * 0.3.4 2020-04-17 [1] CRAN (R 4.0.3)
## R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.3)
## rappdirs 0.3.1 2016-03-28 [1] CRAN (R 4.0.3)
## Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.3)
## readr * 1.4.0 2020-10-05 [1] CRAN (R 4.0.3)
## readxl * 1.3.1 2019-03-13 [1] CRAN (R 4.0.3)
## reprex 0.3.0 2019-05-16 [1] CRAN (R 4.0.3)
## rlang 0.4.8 2020-10-08 [1] CRAN (R 4.0.3)
## rmarkdown 2.5 2020-10-21 [1] CRAN (R 4.0.3)
## rstudioapi 0.12 2020-11-10 [1] CRAN (R 4.0.3)
## rvest 0.3.6 2020-07-25 [1] CRAN (R 4.0.3)
## scales 1.1.1 2020-05-11 [1] CRAN (R 4.0.3)
## sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.3)
## SHARK4R * 0.0.1 2020-11-11 [1] Github (sharksmhi/SHARK4R@5198821)
## stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.3)
## stringr * 1.4.0 2019-02-10 [1] CRAN (R 4.0.3)
## tibble * 3.0.4 2020-10-12 [1] CRAN (R 4.0.3)
## tidyr * 1.1.2 2020-08-27 [1] CRAN (R 4.0.3)
## tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.3)
## tidyverse * 1.3.0 2019-11-21 [1] CRAN (R 4.0.3)
## utf8 1.1.4 2018-05-24 [1] CRAN (R 4.0.3)
## vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.3)
## viridisLite 0.3.0 2018-02-01 [1] CRAN (R 4.0.3)
## withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.3)
## worrms * 0.4.2 2020-07-08 [1] CRAN (R 4.0.3)
## xfun 0.19 2020-10-30 [1] CRAN (R 4.0.3)
## xml2 1.3.2 2020-04-23 [1] CRAN (R 4.0.3)
## yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.3)
##
## [1] C:/__R/R-4.0.3/library
## Time difference of 14.18195 secs